//
//  MineHeadView.m
//  GiftNote
//
//  Created by lanou on 15/8/21.
//  Copyright (c) 2015年 GN. All rights reserved.
//

#import "MineHeadView.h"
#import "HomeHeader.h"

@implementation MineHeadView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        _imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, kHomeWidth, kHomeHeight / 3)];
        [self addSubview:_imageView];
        
        _headButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _headButton.frame = CGRectMake(kHomeWidth / 2 - 30, kHomeHeight / 6 - 30, 60, 60);
        _headButton.backgroundColor = [UIColor grayColor];
        _headButton.layer.masksToBounds = YES;
        _headButton.layer.cornerRadius = 30;
        [_headButton addTarget:self action:@selector(doTapButtonAction:) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:_headButton];
        
    }
    return self;
}

- (void)doTapButtonAction:(UIButton *)sender
{
    if (_delegate && [_delegate respondsToSelector:@selector(buttonAction:)]) {
        [_delegate buttonAction:_headButton];
    }
}

@end
